#include<stdio.h>
char* longestCommonPrefix(char** strs, int strsSize) {
    int min = 100000;
    int pos=0;
    for(int i=0;i<strsSize;i++){
        if(strlen(strs[i])<min){
            min = strlen(strs[i]);
        }
    }
    char *s = (char*)malloc(sizeof(char)*(min+1));
    int index;
    for(index=0;index<min;index++){
        s[index] = strs[0][index];
        for(int j=0;j<strsSize;j++){
            if(strs[j][index]!=s[index]){
                pos++;
            }
        }
        if(pos){
            break;
        }
    }
    s[index]='\0';
    return s;
}
int main()
{
    longestCommonPrefix(strs , strsSize);
    return 0;
}